/**
 * 管理员头部
 * @author 韩睿倩
 */
<template>
  <header>
    <div class="left">
      <el-button @click="handleMenu" plain icon="el-icon-menu" size="mini"></el-button>
      <!-- <h3 style="color: #fff">首页</h3> -->
      <!-- 
      <el-page-header content="详情页面">
      </el-page-header> -->


    </div>
    <div class="right">
      <el-dropdown trigger="click">
        <span>
          <img class="administrator" src="../../assets/images/administratorImg.png" />
        </span>
        <el-dropdown-menu slot="dropdown">
          <!-- <el-dropdown-item @click.native="adminPerson">个人中心</el-dropdown-item> -->
          <el-dropdown-item @click.native="changeInfo">修改信息</el-dropdown-item>
          <el-dropdown-item @click.native="handleLogout">退出登录</el-dropdown-item>
        </el-dropdown-menu>
      </el-dropdown>
    </div>
  </header>
</template>

<script>
export default {
  name: "AdministratorHeader",
  data() {
    return {};
  },
  methods: {
    handleMenu() {
      this.$store.dispatch('collapseMenu')
    },
    handleLogout() {
      this.$router.push({ name: "LoginPage" })
      this.$store.dispatch("Logout")
    },
    changeInfo() {
      this.$router.push({ name: "adminInfoPage" })
    },

  }
};
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
header {
  display: flex;
  height: 100%;
  justify-content: space-between;
  align-items: center;
}


.left {
  display: flex;
  align-items: center;


  .el-button {
    margin-right: 20px;
  }
}

.right {
  .administrator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 30px
  }
}
</style>

<style lang="scss">
.el-dropdown-menu__item {
  list-style: none;
  line-height: 36px;
  padding: 0 20px;
  margin: 0;
  font-size: 16px;
  color: #606266;
  cursor: pointer;
  outline: 0;
}
</style>

